<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let salary, specialPurpose, tax, basics
        salary = 6500
        specialPurpose = 500
        salary > 5000 ? tax = salary * 0.03 : tax = 0;

        basics = salary - specialPurpose - tax
        alert(`${basics}`)
    </script>
</body>

</html>